home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 2.4 KB | 64 lines | [TEXT/CWIE] |
- // ProcessInfo.h
-
- #ifndef ProcessInfo_h
- #define ProcessInfo_h
-
- #ifndef Process_h
- #include "Process.h"
- #endif
- #ifndef FileLocation_h
- #include "FileLocation.h"
- #endif
- #ifndef Tick_h
- #include "Tick.h"
- #endif
-
- class ProcessInfo: public ProcessInfoRec
- {
- private:
- Str31 name;
- FileLocation file;
-
- public:
- ProcessInfo( ::Process );
- ProcessInfo( ::Process::ApplicationProcess );
-
- void Get( ::Process );
- void Get( ::Process::ApplicationProcess );
-
- static const ProcessInfo& Application();
-
- ConstPString Name() const { return name; }
- ::Process Process() const { return processNumber; }
- FileType Type() const { return FileType::Make( processType ); }
- FileSignature Signature() const { return FileSignature::Make( processSignature ); }
-
- const void *PartitionStart() const { return processLocation; }
- uint32 PartitionSize() const { return processSize; }
- ConstData Partition() const { return ConstData( PartitionStart(), PartitionSize() ); }
-
- uint32 FreeMemory() const { return processFreeMem; }
- bool HasLauncher() const;
- ::Process Launcher() const { Assert( HasLauncher() ); return processLauncher; }
- Tick LaunchTick() const { return processLaunchDate; }
- uint32 ActiveTicks() const { return processActiveTime; }
-
- const FileLocation& File() const { return file; }
-
- bool IsDeskAccessory() const { return (processMode & modeDeskAccessory) != 0; }
- bool CanMultiLaunch() const { return (processMode & modeMultiLaunch) != 0; }
- bool NeedsSuspendResume() const { return (processMode & modeNeedSuspendResume) != 0; }
- bool CanBackground() const { return (processMode & modeCanBackground) != 0; }
- bool ActivatesOnResume() const { return (processMode & modeDoesActivateOnFGSwitch) != 0; }
- bool OnlyBackground() const { return (processMode & modeOnlyBackground) != 0; }
- bool GetsFrontClicks() const { return (processMode & modeGetFrontClicks) != 0; }
- bool GetsApplicationDied() const { return (processMode & modeGetAppDiedMsg) != 0; }
- bool CleanFor32Bits() const { return (processMode & mode32BitCompatible) != 0; }
- bool HighLevelEventAware() const { return (processMode & modeHighLevelEventAware) != 0; }
- bool GetsRemoteEvents() const { return (processMode & modeLocalAndRemoteHLEvents) != 0; }
- bool StationeryAware() const { return (processMode & modeStationeryAware) != 0; }
- bool UsesTextEditServices() const { return (processMode & modeUseTextEditServices) != 0; }
- };
-
- #endif
-